import http from '@/http'
import { CarListParm,updateCarParm,deleteCarParm } from './CarModel'
export const getListApi = (parm: CarListParm) => {
	return http.post('/api/cart/list', parm)
}

export const updateCarApi = (parm: updateCarParm) => {
	return http.post('/api/cart/update', parm)
}

//删除购物车中的商品
export const deleteCarApi = (parm: deleteCarParm) => {
	return http.post('/api/cart/delete', parm)
}

//查询购物车中商品数量
export const  queryCountApi = (param:any) =>{
	return http.post('/api/cart/queryCount',param)
}

//加入购物车
export const  addCarApi = (param:any) =>{
	return http.post('/api/cart/add',param)
}